object dm: Tdm
  OldCreateOrder = False
  OnCreate = DataModuleCreate
  Left = 611
  Top = 181
  Height = 306
  Width = 463
  object conn: TADOConnection
    LoginPrompt = False
    Provider = 'SQLOLEDB.1'
    Left = 32
    Top = 16
  end
  object adoqAgent: TADOQuery
    Connection = conn
    CursorType = ctStatic
    BeforeOpen = adoqAgentBeforeOpen
    Parameters = <>
    SQL.Strings = (
      'select * from AgentProvider where 1=1')
    Left = 32
    Top = 80
  end
  object adoContractList: TADOQuery
    Connection = conn
    CursorType = ctStatic
    BeforeOpen = adoContractListBeforeOpen
    Parameters = <>
    SQL.Strings = (
      'select * from viewContractOrder where 1=1 and 2=2')
    Left = 72
    Top = 144
  end
  object adoContract: TADOQuery
    Connection = conn
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'select * from ContractOrder')
    Left = 144
    Top = 32
    object adoContractOrderID: TAutoIncField
      FieldName = 'OrderID'
      ReadOnly = True
    end
    object adoContractOrderNumber: TStringField
      FieldName = 'OrderNumber'
    end
    object adoContractOrderDate: TDateTimeField
      FieldName = 'OrderDate'
    end
    object adoContractOrderState: TStringField
      FieldName = 'OrderState'
      Size = 10
    end
    object adoContractOrderSummary: TStringField
      FieldName = 'OrderSummary'
      Size = 80
    end
    object adoContractCustomerName: TStringField
      FieldName = 'CustomerName'
      Size = 50
    end
    object adoContractLinkMan: TStringField
      FieldName = 'LinkMan'
    end
    object adoContractAddress: TStringField
      FieldName = 'Address'
      Size = 50
    end
    object adoContractTelePhone: TStringField
      FieldName = 'TelePhone'
      Size = 50
    end
    object adoContractMobilePhone: TStringField
      FieldName = 'MobilePhone'
      Size = 50
    end
    object adoContractPostCode: TStringField
      FieldName = 'PostCode'
    end
    object adoContractIndustry: TStringField
      FieldName = 'Industry'
    end
    object adoContractCustomerStyle: TStringField
      FieldName = 'CustomerStyle'
    end
    object adoContractTotalSum: TBCDField
      FieldName = 'TotalSum'
      Precision = 18
      Size = 2
    end
    object adoContractBalanceSum: TBCDField
      FieldName = 'BalanceSum'
      Precision = 18
      Size = 2
    end
    object adoContractRemainSum: TBCDField
      FieldName = 'RemainSum'
      ReadOnly = True
      Precision = 19
      Size = 2
    end
    object adoContractAgentID: TIntegerField
      FieldName = 'AgentID'
    end
    object adoContractContract: TBlobField
      FieldName = 'Contract'
    end
  end
  object adoContractItem: TADOQuery
    Connection = conn
    CursorType = ctStatic
    DataSource = dsContract
    Parameters = <
      item
        Name = 'orderid'
        Attributes = [paSigned, paNullable]
        DataType = ftInteger
        Precision = 10
        Value = 2
      end>
    SQL.Strings = (
      'select * from ContractItem where orderid =:orderid')
    Left = 304
    Top = 24
  end
  object dsContract: TDataSource
    DataSet = adoContract
    Left = 144
    Top = 88
  end
  object dsAgent: TDataSource
    DataSet = adoqAgent
    Left = 80
    Top = 24
  end
  object dspContract: TDataSetProvider
    DataSet = adoContract
    Options = [poAutoRefresh]
    AfterApplyUpdates = dspContractAfterApplyUpdates
    Left = 216
    Top = 40
  end
  object dspContractItem: TDataSetProvider
    DataSet = adoContractItem
    Left = 304
    Top = 88
  end
  object adoAccountList: TADOQuery
    Connection = conn
    CursorType = ctStatic
    Parameters = <
      item
        Name = 'itemid'
        Attributes = [paSigned, paNullable]
        DataType = ftInteger
        Precision = 10
        Size = 4
        Value = Null
      end
      item
        Name = 'orderid'
        Attributes = [paSigned, paNullable]
        DataType = ftInteger
        Precision = 10
        Size = 4
        Value = Null
      end>
    SQL.Strings = (
      
        'select * from viewAccount where itemid=:itemid and orderid=:orde' +
        'rid')
    Left = 264
    Top = 160
  end
  object adoAccount: TADOQuery
    Connection = conn
    Parameters = <>
    Left = 160
    Top = 160
  end
  object adouser: TADOQuery
    Connection = conn
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'select * from loginuser')
    Left = 64
    Top = 208
    object adouserusename: TStringField
      FieldName = 'usename'
    end
    object adouserpassword: TStringField
      FieldName = 'password'
    end
    object adouserAgentID: TIntegerField
      FieldName = 'AgentID'
    end
  end
  object adotemp: TADOQuery
    Connection = conn
    Parameters = <>
    Left = 160
    Top = 224
  end
end
